//
//  TKIMUserExt.m
//  TKIM_Thinkive
//
//  Created by liupm on 16/2/23.
//  Copyright © 2016年 liupm. All rights reserved.
//

#import "TKIMUserExt.h"
#import <objc/runtime.h>

@implementation TKIMUser(TKIMUserExt)
static const char *strIsSelectedKey = "strIsSelectedKey";
static const char *strDisableSelectionKey = "strDisableSelectionKey";

-(void)setEmail:(NSString *)email
{
    self.userExt[@"email"] = email;
}


-(NSString *)email
{
    return self.userExt[@"email"];
}


-(void)setJobName:(NSString *)jobname
{
    self.userExt[@"jobname"] = jobname;
}


-(NSString *)jobName
{
    return self.userExt[@"jobname"];
}


-(void)setMobile:(NSString *)mobile
{
    self.userExt[@"mobile"] = mobile;
}


-(NSString *)mobile
{
    return self.userExt[@"mobile"];
}


-(void)setSex:(NSString *)sex
{
    self.userExt[@"sex"] = sex;
}


-(NSString *)sex
{
    return self.userExt[@"sex"];
}


-(void)setDepartment:(NSString *)department
{
    self.userExt[@"department"] = department;
}


-(NSString *)department
{
    return self.userExt[@"department"];
}


-(void)setAddress:(NSString *)address
{
    self.userExt[@"address"] = address;
}


-(NSString *)address
{
    return self.userExt[@"address"];
}


-(void)setBirthday:(NSString *)birthday
{
    self.userExt[@"birthday"] = birthday;
}


-(NSString *)birthday
{
    return self.userExt[@"birthday"];
}


-(void)setIsSelected:(BOOL)isSelected
{
    objc_setAssociatedObject(self, strIsSelectedKey, @(isSelected), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}


-(BOOL)isSelected
{
    NSNumber *number = objc_getAssociatedObject(self, strIsSelectedKey);;
    return  [number boolValue];
}


-(void)setDisableSelection:(BOOL)disableSelection
{
    objc_setAssociatedObject(self, strDisableSelectionKey, @(disableSelection), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}


-(BOOL)disableSelection
{
    NSNumber *number = objc_getAssociatedObject(self, strDisableSelectionKey);;
    return  [number boolValue];
}


-(BOOL)active
{
    return [self.userExt[@"active"] boolValue];
}


-(void)setActive:(BOOL)active
{
    self.userExt[@"active"] = @(active);
}


@end